package com.zy.openchat.core.manager;

public class TgResponse {
    //常规判断ok即可
    public boolean ok;
    public String errString;

    //api有特别说明，才关注此字段，只涉及极少数
    public int errCode;

    //api有特别说明，才关注此字段，只涉及少数几个
    public Object data;

    public TgResponse(boolean ok, String errString) {
        this.ok = ok;
        this.errString = errString;
        this.errCode = 0;
    }

    public TgResponse(boolean ok, int errCode, String errString) {
        this.ok = ok;
        this.errCode = errCode;
        this.errString = errString;
    }

    public TgResponse(boolean ok, int errCode, String errString, Object data) {
        this.ok = ok;
        this.errCode = errCode;
        this.errString = errString;
        this.data = data;
    }
}